#region License

// Copyright (c) 2013, ClearCanvas Inc.
// All rights reserved.
// http://www.clearcanvas.ca
//
// This file is part of the ClearCanvas RIS/PACS open source project.
//
// The ClearCanvas RIS/PACS open source project is free software: you can
// redistribute it and/or modify it under the terms of the GNU General Public
// License as published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// The ClearCanvas RIS/PACS open source project is distributed in the hope that it
// will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
// Public License for more details.
//
// You should have received a copy of the GNU General Public License along with
// the ClearCanvas RIS/PACS open source project.  If not, see
// <http://www.gnu.org/licenses/>.

#endregion

using ClearCanvas.Enterprise.Core;
using ClearCanvas.Enterprise.Common;

namespace ClearCanvas.Healthcare
{
	/// <summary>
	/// Defines an interface that provides a <see cref="Worklist"/> with information about the context
	/// in which it is executing.
	/// </summary>
	public interface IWorklistQueryContext
	{
		/// <summary>
		/// Gets the staff on whose behalf the worklist is executing.
		/// </summary>
		Staff ExecutingStaff { get; }

		/// <summary>
		/// Gets the working <see cref="Facility"/> for which the worklist is executing, or null if the working facility is not known.
		/// </summary>
		Facility WorkingFacility { get; }

		/// <summary>
		/// Gets a value indicating whether the worklist is being invoked in downtime recovery mode.
		/// </summary>
		bool DowntimeRecoveryMode { get; }

		/// <summary>
		/// Gets the <see cref="SearchResultPage"/> that specifies which page of the worklist is requested.
		/// </summary>
		SearchResultPage Page { get; }

		/// <summary>
		/// Obtains an instance of the specified broker.
		/// </summary>
		/// <typeparam name="TBrokerInterface"></typeparam>
		/// <returns></returns>
		TBrokerInterface GetBroker<TBrokerInterface>() where TBrokerInterface : IPersistenceBroker;
	}
}
